<?php
class Token {
	// 设置一些静态变量
	private static $METHOD = "product_token" ;
	private static $SECRET = "123456ken" ;
	private static $NAMESPACE = "Account\Admin\Token" ;
	public function product_token() {
		$date = date("Y-m-d",time());
		$http_host = ($_SERVER['HTTP_HOST']);
		$api_token = md5($http_host . Token::$NAMESPACE . $date . Token::$METHOD . Token::$SECRET);
		return $api_token;
	}
}

$token = new Token();

